<!DOCTYPE html>
<html>
<head>
    <title>基础数据登记</title>
<#include "../common/common.ftl"/>
    <link rel="stylesheet" href="/style/contractForm.css" media="all">
</head>
<body>
<div class="layui-fluid">
    <form class="layui-form" id="contractForm">
        <input type="hidden" name="contractId" value="${(contract.id)!}"/>
        <div class="layui-card">
            <div class="layui-card-header">一、被征收人基本信息<span class="jmdf-color-red">*若是商业,配置参数不可手动选择！！！*</span></div>
            <div class="layui-card-body">
                <div class="layui-form-item">
                    <div class="layui-col-xs6">
                        <div class="layui-inline">
                            <label class="layui-form-labelLong jmdf-color-red">项目名称：</label>
                            <div class="layui-input-blockRight" style="width: 200px;">
                                <select name="zsProjectId" id="zsProjectSelect" lay-verify="required">
                                    <option value="">--请选择--</option>
                                </select>
                            </div>
                        </div>
                    </div>
                    <div class="layui-col-xs6">
                        <div class="layui-inline">
                            <label class="layui-form-labelLong jmdf-color-red">组别：</label>
                            <div class="layui-input-blockRight" style="width: 200px">
                                <select name="groupCode" id="groupCode" lay-verify="required">
                                    <option value="">--请选择--</option>
                                </select>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="layui-form-item">
                    <div class="layui-col-xs6">
                        <div class="layui-inline">
                            <label class="layui-form-labelLong jmdf-color-red">协议编号：</label>
                            <div class="layui-input-blockRight">
                                <input type="text" class="layui-input" autocomplete="off" placeholder="必填项"
                                       style="width: 200px;"
                                       name="contractCode" value="${(contract.contractCode)!}"
                                       lay-verify="required|contractCode"/>
                            </div>
                        </div>
                    </div>
                    <div class="layui-col-xs6">
                        <div class="layui-inline">
                            <label class="layui-form-labelLong">联系电话：</label>
                            <div class="layui-input-blockRight">
                                <input type="text" class="layui-input" autocomplete="off" style="width: 260px;"
                                       name="tel" value="${(contract.tel)!}"/>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="layui-form-item">
                    <div class="layui-col-xs6">
                        <div class="layui-inline">
                            <label class="layui-form-labelLong jmdf-color-red">被征收人：</label>
                            <div class="layui-input-blockRight" style="width: 200px">
                                <input type="text" class="layui-input" autocomplete="off" style="width: 200px;"
                                       placeholder="必填项" name="name" value="${(contract.name)!}" lay-verify="required"/>
                            </div>
                        </div>
                    </div>
                    <div class="layui-col-xs6">
                        <div class="layui-inline">
                            <label class="layui-form-labelLong">身份证号：</label>
                            <div class="layui-input-blockRight">
                                <input type="text" class="layui-input" autocomplete="off" style="width: 260px;"
                                       name="idCard" value="${(contract.idCard)!}"/>
                            </div>
                        </div>
                    </div>

                </div>
                <div class="layui-form-item">
                    <div class="layui-col-xs6">
                        <div class="layui-inline">
                            <label class="layui-form-labelLong">村落：</label>
                            <div class="layui-input-blockRight" style="width: 200px">
                                <input type="text" class="layui-input" autocomplete="off" style="width: 200px;"
                                       name="village" value="${(contract.village)!}"/>
                            </div>
                        </div>
                    </div>
                    <div class="layui-col-xs6">
                        <div class="layui-inline">
                            <label class="layui-form-labelLong">文本编号：</label>
                            <div class="layui-input-blockRight" style="width: 200px">
                                <input type="text" class="layui-input" autocomplete="off" style="width: 200px;"
                                       name="textCode" value="${(contract.textCode)!}"/>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="layui-form-item">
                    <div class="layui-col-xs6">
                        <div class="layui-inline">
                            <label class="layui-form-labelLong">征迁房屋性质：</label>
                            <div class="layui-input-blockRight" style="width: 200px">
                                <input type="text" class="layui-input" autocomplete="off" style="width: 200px;"
                                       name="zqHouseType" value="${(contract.zqHouseType)!}"/>
                            </div>
                        </div>
                    </div>
                    <div class="layui-col-xs6">
                        <div class="layui-inline">
                            <label class="layui-form-labelLong">安置方式：</label>
                            <div class="layui-input-blockRight" style="width: 200px">
                                <input type="text" class="layui-input" autocomplete="off" style="width: 200px;"
                                       name="azType" value="${(contract.azType)!}"/>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="layui-form-item">
                    <div class="layui-col-xs12">
                        <div class="layui-inline">
                            <label class="layui-form-labelLong">征迁所在路段：</label>
                            <div class="layui-input-blockRight" style="width: 200px">
                                <input type="text" class="layui-input" autocomplete="off" style="min-width: 600px;"
                                       name="zqSzLd" value="${(contract.zqSzLd)!}"/>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="layui-form-item">
                    <div class="layui-col-xs6">
                        <div class="layui-inline">
                            <label class="layui-form-labelLong">临时安置补偿标准：</label>
                            <div class="layui-input-blockRight" style="width: 200px">
                                <input type="text" class="layui-input" autocomplete="off" style="width: 200px;"
                                       name="lsAzBzPrice" value="${(contract.lsAzBzPrice)!}"/>
                            </div>
                        </div>
                    </div>
                    <div class="layui-col-xs6">
                        <div class="layui-inline">
                            <label class="layui-form-labelLong">临时安置(增加)标准：</label>
                            <div class="layui-input-blockRight" style="width: 200px">
                                <input type="text" class="layui-input" autocomplete="off" style="width: 200px;"
                                       name="lsAzBzZjPrice" value="${(contract.lsAzBzZjPrice)!}"/>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="layui-form-item">
                    <div class="layui-col-xs6">
                        <div class="layui-inline">
                            <label class="layui-form-labelLong">停业补偿标准：</label>
                            <div class="layui-input-blockRight" style="width: 200px">
                                <input type="text" class="layui-input" autocomplete="off" style="width: 200px;"
                                       name="tcTyBzPrice" value="${(contract.tcTyBzPrice)!}"/>
                            </div>
                        </div>
                    </div>
                    <div class="layui-col-xs6">
                        <div class="layui-inline">
                            <label class="layui-form-labelLong">继承或析产数量：</label>
                            <div class="layui-input-blockRight" style="width: 200px">
                                <input type="text" class="layui-input" autocomplete="off" style="width: 200px;"
                                       name="xcOrJcNum" value="${(contract.xcOrJcNum)!}"/>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="layui-form-item">
                    <div class="layui-col-xs6">
                        <div class="layui-inline">
                            <label class="layui-form-labelLong jmdf-color-red">是否使用填写3800面积：</label>
                            <div class="layui-input-blockRight" style="width: 200px">
                                <select name="isNoSyYhAreaStatus" id="isNoSyYhAreaStatus" lay-verify="required">
                                </select>
                            </div>
                        </div>
                    </div>
                    <div class="layui-col-xs6">
                        <div class="layui-inline">
                            <label class="layui-form-labelLong jmdf-color-red">3800优惠面积：</label>
                            <div class="layui-input-blockRight" style="width: 200px">
                                <input type="text" class="layui-input" autocomplete="off" style="width: 200px;"
                                       name="yhArea" value="${(contract.yhArea)!}"/>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="layui-form-item">
                    <div class="layui-col-xs6">
                        <div class="layui-inline">
                            <label class="layui-form-labelLong">图纸编号：</label>
                            <div class="layui-input-blockRight" style="width: 200px">
                                <input type="text" class="layui-input" autocomplete="off" style="width: 200px;"
                                       name="drawingCode" value="${(contract.drawingCode)!}"/>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div class="layui-card">
            <div class="layui-card-header">二、被征收人选房面积信息<span class="jmdf-color-red">(单位：㎡)</span></div>
            <div class="layui-card-body">
                <div class="layui-form-item">
                    <div class="layui-col-xs6">
                        <div class="layui-inline">
                            <label class="layui-form-labelLong">产权调换面积：</label>
                            <div class="layui-input-blockRight">
                                <input type="text" class="layui-input" autocomplete="off" name="propertyChangeArea"
                                       value="${(contract.propertyChangeArea)!}" lay-verify="bigDecimal"/>
                            </div>
                        </div>
                    </div>
                    <div class="layui-col-xs6">
                        <div class="layui-inline">
                            <label class="layui-form-labelLong">照顾购买面积：</label>
                            <div class="layui-input-blockRight">
                                <input type="text" class="layui-input" autocomplete="off" name="careBuyArea1"
                                       value="${(contract.careBuyArea1)!}" lay-verify="bigDecimal"/>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="layui-form-item">
                    <div class="layui-col-xs6">
                        <div class="layui-inline">
                            <label class="layui-form-labelLong">住改商需安置间数：</label>
                            <div class="layui-input-blockRight">
                                <input type="text" class="layui-input" autocomplete="off" name="zgsHouseAzNum"
                                       value="${(contract.zgsHouseAzNum)!}" lay-verify="bigDecimal"/>
                            </div>
                        </div>
                    </div>

                    <div class="layui-col-xs6">
                        <div class="layui-inline">
                            <label class="layui-form-labelLong">住改商需安置面积：</label>
                            <div class="layui-input-blockRight">
                                <input type="text" class="layui-input" autocomplete="off" name="zgsHouseAzArea"
                                       value="${(contract.zgsHouseAzArea)!}" lay-verify="bigDecimal"/>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="layui-form-item">
                    <div class="layui-col-xs6">
                        <div class="layui-inline">
                            <label class="layui-form-labelLong">商业店面需安置间数：</label>
                            <div class="layui-input-blockRight">
                                <input type="text" class="layui-input" autocomplete="off" name="syDmAzNum"
                                       value="${(contract.syDmAzNum)!}" lay-verify="bigDecimal"/>
                            </div>
                        </div>
                    </div>
                    <div class="layui-col-xs6">
                        <div class="layui-inline">
                            <label class="layui-form-labelLong">商业店面需安置面积：</label>
                            <div class="layui-input-blockRight">
                                <input type="text" class="layui-input" autocomplete="off" name="syDmAzArea"
                                       value="${(contract.syDmAzArea)!}" lay-verify="bigDecimal"/>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="layui-form-item">
                    <div class="layui-col-xs6">
                        <div class="layui-inline">
                            <label class="layui-form-labelLong">商业二层需安置面积：</label>
                            <div class="layui-input-blockRight">
                                <input type="text" class="layui-input" autocomplete="off" name="syTwoFloorAzArea"
                                       value="${(contract.syTwoFloorAzArea)!}" lay-verify="bigDecimal"/>
                            </div>
                        </div>
                    </div>
                    <div class="layui-col-xs6">
                        <div class="layui-inline">
                            <label class="layui-form-labelLong">商业写字楼需安置面积：</label>
                            <div class="layui-input-blockRight">
                                <input type="text" class="layui-input" autocomplete="off" name="syXzlAzArea"
                                       value="${(contract.syXzlAzArea)!}" lay-verify="bigDecimal"/>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="layui-form-item">
                    <div class="layui-col-xs6">
                        <div class="layui-inline">
                            <label class="layui-form-labelLong">商业商场需安置面积：</label>
                            <div class="layui-input-blockRight">
                                <input type="text" class="layui-input" autocomplete="off" name="syScAzArea"
                                       value="${(contract.syScAzArea)!}" lay-verify="bigDecimal"/>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div class="layui-card">
            <div class="layui-card-header">三、意向户型数量及面积</div>
            <div class="layui-card-body">
                <div class="layui-form-item">
                    <div class="layui-col-xs6">
                        <div class="layui-inline">
                            <label class="layui-form-labelLong">预定车位：</label>
                            <div class="layui-input-blockRight">
                                <input type="text" class="layui-input" autocomplete="off" name="carLotYxYdNum"
                                       value="${(contract.carLotYxYdNum)!}" lay-verify="bigDecimal"/>
                            </div>
                        </div>
                    </div>
                    <div class="layui-col-xs6">
                        <div class="layui-inline">
                            <label class="layui-form-labelLong">置换车位：</label>
                            <div class="layui-input-blockRight">
                                <input type="text" class="layui-input" autocomplete="off" name="carLotYxZhNum"
                                       value="${(contract.carLotYxZhNum)!}" lay-verify="bigDecimal"/>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="layui-form-item">
                    <div class="layui-col-xs6">
                        <div class="layui-inline">
                            <label class="layui-form-labelLong">60型：</label>
                            <div class="layui-input-blockRight">
                                <input type="text" class="layui-input" autocomplete="off" name="house60YxNum"
                                       value="${(contract.house60YxNum)!}" lay-verify="bigDecimal"/>
                            </div>
                        </div>
                    </div>
                    <div class="layui-col-xs6">
                        <div class="layui-inline">
                            <label class="layui-form-labelLong">80型：</label>
                            <div class="layui-input-blockRight">
                                <input type="text" class="layui-input" autocomplete="off" name="house80YxNum"
                                       value="${(contract.house80YxNum)!}" lay-verify="bigDecimal"/>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="layui-form-item">
                    <div class="layui-col-xs6">
                        <div class="layui-inline">
                            <label class="layui-form-labelLong">100型：</label>
                            <div class="layui-input-blockRight">
                                <input type="text" class="layui-input" autocomplete="off" name="house100YxNum"
                                       value="${(contract.house100YxNum)!}" lay-verify="bigDecimal"/>
                            </div>
                        </div>
                    </div>
                    <div class="layui-col-xs6">
                        <div class="layui-inline">
                            <label class="layui-form-labelLong">120型：</label>
                            <div class="layui-input-blockRight">
                                <input type="text" class="layui-input" autocomplete="off" name="house120YxNum"
                                       value="${(contract.house120YxNum)!}" lay-verify="bigDecimal"/>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="layui-form-item">
                    <div class="layui-col-xs6">
                        <div class="layui-inline">
                            <label class="layui-form-labelLong">140型：</label>
                            <div class="layui-input-blockRight">
                                <input type="text" class="layui-input" autocomplete="off" name="house140YxNum"
                                       value="${(contract.house140YxNum)!}" lay-verify="bigDecimal"/>
                            </div>
                        </div>
                    </div>
                    <div class="layui-col-xs6">
                        <div class="layui-inline">
                            <label class="layui-form-labelLong">160型：</label>
                            <div class="layui-input-blockRight">
                                <input type="text" class="layui-input" autocomplete="off" name="house160YxNum"
                                       value="${(contract.house160YxNum)!}" lay-verify="bigDecimal"/>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="layui-form-item">
                    <div class="layui-col-xs6">
                        <div class="layui-inline">
                            <label class="layui-form-labelLong">180型：</label>
                            <div class="layui-input-blockRight">
                                <input type="text" class="layui-input" autocomplete="off" name="house180YxNum"
                                       value="${(contract.house180YxNum)!}" lay-verify="bigDecimal"/>
                            </div>
                        </div>
                    </div>
                    <div class="layui-col-xs6">
                        <div class="layui-inline">
                            <label class="layui-form-labelLong">复式1型：</label>
                            <div class="layui-input-blockRight">
                                <input type="text" class="layui-input" autocomplete="off" name="houseFsOneYxNum"
                                       value="${(contract.houseFsOneYxNum)!}" lay-verify="bigDecimal"/>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="layui-form-item">
                    <div class="layui-col-xs6">
                        <div class="layui-inline">
                            <label class="layui-form-labelLong">复式2型：</label>
                            <div class="layui-input-blockRight">
                                <input type="text" class="layui-input" autocomplete="off" name="houseFsTwoYxNum"
                                       value="${(contract.houseFsTwoYxNum)!}" lay-verify="bigDecimal"/>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>

        <div class="layui-card">
            <div class="layui-card-header">四、其它信息</div>
            <div class="layui-card-body">
                <div class="layui-form-item">
                    <div class="layui-col-xs6">
                        <div class="layui-inline">
                            <label class="layui-form-labelLong">征迁协议所在系统：</label>
                            <div class="layui-input-blockRight">
                                <input type="radio"
                                       <#if (!contract.newOldStatus?? || contract.newOldStatus == 4)>checked</#if>
                                       name="newOldStatus" value="4" title="24年前老系统"/>
                                <input type="radio"
                                       <#if (contract.newOldStatus?? && contract.newOldStatus == 5)>checked</#if>
                                       name="newOldStatus" value="5" title="24年后新系统"/>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="layui-form-item">
                    <div class="layui-col-xs6">
                        <div class="layui-inline">
                            <label class="layui-form-labelLong">是否结算：</label>
                            <div class="layui-input-blockRight">
                                <input type="radio"
                                       <#if (!contract.isJiSuan?? || contract.isJiSuan == 1)>checked</#if>
                                       name="isJiSuan" value="1" title="正常结算"/>
                                <input type="radio"
                                       <#if (contract.isJiSuan?? && contract.isJiSuan == 2)>checked</#if>
                                       name="isJiSuan" value="2" title="期房"/>
                                <input type="radio"
                                       <#if (contract.isJiSuan?? && contract.isJiSuan == 3)>checked</#if>
                                       name="isJiSuan" value="3" title="合并"/>
                            </div>
                        </div>
                    </div>
                    <#if !contract.azType?contains("商业")>
                        <div class="layui-col-xs6">
                            <div class="layui-inline">
                                <label class="layui-form-labelLong jmdf-color-red">使用方案：</label>
                                <div class="layui-input-blockRight" style="width: 200px;">
                                    <select name="parameterId" id="parameterSelect" lay-verify="required">
                                        <option value="">--请选择--</option>
                                    </select>
                                </div>
                            </div>
                        </div>
                    </#if>
                </div>
                <#--<div class="layui-form-item">
                    <div class="layui-col-xs6">
                        <div class="layui-inline">
                            <label class="layui-form-labelLong jmdf-color-red">安排选房时间：</label>
                            <div class="layui-input-blockRight">
                                <input type="text" class="layui-input" lay-verify="required" id="preChooseDate"
                                       name="preChooseDate" value="${(contract.preChooseDate?string('yyyy-MM-dd'))!}">
                            </div>
                        </div>
                    </div>
                    <div class="layui-col-xs6">
                        <div class="layui-inline">
                            <label class="layui-form-labelLong jmdf-color-red">安排选房时间段：</label>
                            <div class="layui-input-blockRight" style="width: 200px">
                                <select name="betweenChooseDate" lay-verify="required" id="betweenChooseDate">
                                    <option value="">--请选择--</option>
                                </select>
                            </div>
                        </div>
                    </div>
                </div>-->
                <div class="layui-form-item">
                    <div class="layui-col-xs6">
                        <div class="layui-inline">
                            <label class="layui-form-labelLong jmdf-color-red">选房号：</label>
                            <div class="layui-input-blockRight">
                                <input type="text" class="layui-input" autocomplete="off" name="chooseHouseNum"
                                       value="${(contract.chooseHouseNum)!}" placeholder="必填项"
                                       lay-verify="required|chooseHouseNum"/>
                            </div>
                        </div>
                    </div>
                    <div class="layui-col-xs6">
                        <div class="layui-inline">
                            <label class="layui-form-labelLong">腾空时间：</label>
                            <div class="layui-input-blockRight">
                                <input type="text" class="layui-input" id="tkDate" name="tkDate"
                                       value="${(contract.tkDate?string('yyyy-MM-dd'))!}">
                            </div>
                        </div>
                    </div>
                </div>
                <#--<div class="layui-form-item">
                    <div class="layui-col-xs6">
                        <div class="layui-inline">
                            <label class="layui-form-labelLong">住宅过渡补助费：<span
                                    class="jmdf-color-red">(元/月)</span></label>
                            <div class="layui-input-blockRight">
                                <input type="text" class="layui-input" lay-verify="bigDecimal" name="zzgdMoney"
                                       value="${(contract.zzgdMoney)!}">
                            </div>
                        </div>
                    </div>
                    <div class="layui-col-xs6">
                        <div class="layui-inline">
                            <label class="layui-form-labelLong">装修过渡补助费：<span
                                    class="jmdf-color-red">(元/月)</span></label>
                            <div class="layui-input-blockRight">
                                <input type="text" class="layui-input" lay-verify="bigDecimal" name="zxgdMoney"
                                       value="${(contract.zxgdMoney)!}">
                            </div>
                        </div>
                    </div>
                </div>-->
                <div class="layui-form-item">
                    <div class="layui-col-xs6">
                        <div class="layui-inline">
                            <label class="layui-form-labelLong">征收补偿应缴金额：<span class="jmdf-color-red">(元)</span></label>
                            <div class="layui-input-blockRight">
                                <input type="text" class="layui-input" name="resultMoney"
                                       value="${(contract.resultMoney)!}">
                            </div>
                        </div>
                    </div>
                    <div class="layui-col-xs6">
                        <div class="layui-inline">
                            <label class="layui-form-labelLong">其它金额：<span class="jmdf-color-red">(元)</span></label>
                            <div class="layui-input-blockRight">
                                <input type="text" class="layui-input" lay-verify="isNumber" name="otherMoney"
                                       value="${(contract.otherMoney)!}">
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>

        <div class="layui-card">
            <div class="layui-card-header">五、备注</div>
            <div class="layui-card-body">
                <div class="layui-form-item">
                    <div class="layui-col-xs12">
                        <div class="layui-inline">
                            <textarea class="layui-textarea" cols="180" rows="5"
                                      name="memo">${(contract.memo)!}</textarea>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <button style="display: none;" class="layui-btn" id="submitBtn" name="submitBtn" lay-submit=""
                lay-filter="submit">立即提交
        </button>
    </form>
</div>
<script src="/layui/layui.js" charset="utf-8"></script>
<script src="/bigDecimal/BigDecimal-all-last.js"></script>
<script src="/bigDecimal/BigDecimal-all-last.min.js"></script>
<script>
    layui.config({
        base: '/modules/' //静态资源所在路径
    }).use(['form', 'jquery', 'jmdf', 'dataDict', 'element', 'laydate', 'verify'], function () {
        var form = layui.form, $ = layui.jquery, dataDict = layui.dataDict, jmdf = layui.jmdf, laydate = layui.laydate,
                verify = layui.verify, parentIndex = parent.layer.getFrameIndex(window.name);

        dataDict.select("组别", "groupCode", "${(contract.groupCode)!}");
        dataDict.select("是否", "isNoSyYhAreaStatus", "${(contract.isNoSyYhAreaStatus)!}");
        dataDict.select("安排选房时间段", "betweenChooseDate", "${(contract.betweenChooseDate)!}");
        dataDict.zsProject("zsProjectSelect", "${(contract.zsProject.id)!}");
        dataDict.parameter("parameterSelect", "${(contract.parameter.id)!}");

        laydate.render({
            elem: '#preChooseDate'
            , type: 'date'
            , format: 'yyyy-MM-dd'
        });

        laydate.render({
            elem: '#tkDate'
            , type: 'date'
            , format: 'yyyy-MM-dd'
        });

        form.verify({
            chooseHouseNum: function (value) {
                var msg = "";
                var zsProjectId = $("select[name='zsProjectId']").val();
                $.ajax({//选房顺序号非重验证
                    url: 'validateChooseHouseNum',
                    type: 'post',
                    data: {
                        chooseHouseNum: value,
                        zsProjectId: zsProjectId,
                        contractId: '${(contract.id)!}'
                    },
                    async: false,
                    success: function (data) {
                        msg = data;
                    }
                });
                return msg;
            }
            , contractCode: function (value) {
                var msg = "";
                var zsProjectId = $("select[name='zsProjectId']").val();
                $.ajax({//协议编号非重验证
                    url: 'validateContractCode',
                    type: 'post',
                    data: {
                        contractCode: value,
                        zsProjectId: zsProjectId,
                        contractId: '${(contract.id)!}'
                    },
                    async: false,
                    success: function (data) {
                        msg = data;
                    }
                });
                return msg;
            }
        });

        //监听提交
        form.on('submit(submit)', function (data) {
            $.ajax({
                url: 'contractSave',
                type: 'post',
                data: data.field,//当前容器的全部表单字段，名值对形式：{name: value}
                success: function (data) {
                    if (data.code == "0001") {
                        layer.alert(data.message);
                        parent.loadData();
                        parent.layer.close(parentIndex);
                    } else {
                        layer.msg(data.message, {anim: 6, icon: 2, time: 3000});
                    }
                }
            });
            return false;
        });
    });
</script>
</body>
</html>